const mongoose = require('mongoose')

module.exports = (success,error) => {
    mongoose.connect('mongodb://127.0.0.1:27017/fbReleases')

    mongoose.connection.on('open',()=>{
        success()
        console.log('数据库连接成功');
    })

    mongoose.connection.on('error',()=>{
        error()
    })
}